package me.zk.practice1.hw;

import java.util.Scanner;

public class HWBJ19 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        int n = scanner.nextInt();

        System.out.println(n == 0 ? "1":helper(n));

    }
    public static String helper(int n) {
        if (n == 1) {
            return "11";
        }
        String str = helper(n-1);
        //统计数量
        StringBuffer sb = new StringBuffer();

        int count = 1;
        char c = str.charAt(0);
        for (int i = 1; i < str.length(); i++) {
            if (c == str.charAt(i)) {
                count++;
            } else {
                sb.append(count);
                sb.append(c);
                c = str.charAt(i);
                count=1;
            }
            if (i == str.length() -1) {
                sb.append(count);
                sb.append(c);
            }
        }
        return sb.toString();


    }
}
